﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DataAccess_Layer;

namespace Business_Layer
{
    public static class Payment_BUS
    {
        /*
--resultProcess = orderID: The hole process is OK
--resultProcess = 0: there is a error in inserting order
--resultProcess = -1: there is at least one error in inserting order product detail
--resultProcess = -2: there is at least one error in inserting order bonus detail
--resultProcess = -3: there is at least one case that the current quantity < inserting quantity in order product detail
--resultProcess = -4: there is at least one case that the current quantity < inserting quantity in order bonus detail
--resultProcess = -5: there is not enough money in customer account.
--resultProcess = -6: Sum of product score < sum of bonus score.
         */
        public static int payoutUsingSS(long cusID, int stateID, long centerID, string productDetail, string bonusDetail, out int productIdCauseError, out int bonusIdCauseError)
        {
            return Payment_DAC.payoutUsingSS(cusID, stateID, centerID, productDetail, bonusDetail, out productIdCauseError, out bonusIdCauseError);
        }

        public static int payoutUsingBank(long cusID, int stateID, long centerID, string productDetail, string bonusDetail, out int productIdCauseError, out int bonusIdCauseError)
        {
            return Payment_DAC.payoutUsingBank(cusID, stateID, centerID, productDetail, bonusDetail, out productIdCauseError, out bonusIdCauseError);
        }
    }
}
